package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.PaymentFlow;

import com.ruowei.modules.foodOrder.domain.QPaymentFlow;
import com.ruowei.modules.foodOrder.domain.enumeration.FlowType;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * Spring Data  repository for the PaymentFlow entity.
 */
@SuppressWarnings("unused")
@Repository
public interface PaymentFlowRepository extends BaseRepository<Long, PaymentFlow, QPaymentFlow> {
    Optional<PaymentFlow> findFirstByOrderCodeAndTypeOrderByTimeDesc(String orderCode, FlowType type);
}
